﻿<%@ Page Title="Exchange Rate" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ExchRate.aspx.cs" Inherits="IFD2.ExchRate" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQuery">
    <div class="container-fluid body-content" style="width:100%;">

    <div class="row">
        <div class="col-sm-2 well well-sm">
            <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
            <br class="hidden-xs"/>
            <asp:LinkButton ID="lbtnQuery" runat="server" CssClass="form-control input-sm btn-primary text-center" Width="100%" ToolTip="" meta:resourcekey="tipQuery" OnClick="lbtnQuery_Click"> <span class="glyphicon glyphicon-search" style="font-size:large;"></span></asp:LinkButton>
            <asp:Button ID="btnLog" runat="server" Text="Log..." CssClass="form-control input-sm btn-primary" Width="100%" PostBackUrl="ExchRateLog.aspx"  meta:resourcekey="Log" />
            <p></p><%--没有此行(或&nbsp;)，上面的按钮在手机模式(xs)下，只有上半部可以点击！--%>
        </div>

        <div class="col-sm-10 well well-sm">
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="section-2"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" class="table-hover"
                            DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" style="min-width:700px;width:100%;">
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <input name="KEY" type="radio" value='<%# Eval("exch_from")+"|"+Eval("exch_to") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="exch_from" HeaderText="exch_from" SortExpression="exch_from"  meta:resourcekey="exch_from" />
                                <asp:BoundField DataField="exch_rate" HeaderText="exch_rate" SortExpression="exch_rate"  meta:resourcekey="exch_rate" />
                                <asp:BoundField DataField="exch_to" HeaderText="exch_to" SortExpression="exch_to"  meta:resourcekey="exch_to" />
                                <asp:BoundField DataField="done_user" HeaderText="done_user" SortExpression="done_user"  meta:resourcekey="done_user" />
                                <asp:BoundField DataField="done_time" HeaderText="done_time" SortExpression="done_time"  meta:resourcekey="done_time" />
                            </Columns>
                            <RowStyle BackColor="#EFF3FB" />
                            <EditRowStyle BackColor="#2461BF" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                    </div>
                </div>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                    SelectCommand="bll_exchrate_get" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                    <SelectParameters>
                        <asp:SessionParameter Name="airline" SessionField="AIRLINE" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>

                <div class="well well-sm">
                    <asp:Label ID="Label2" runat="server" Text="Rate:" meta:resourcekey="Rate"></asp:Label>
                    <asp:TextBox ID="txtRate2" runat="server" Width="91px" MaxLength="10"></asp:TextBox>
                    <asp:Button ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_Click"  meta:resourcekey="Update" CssClass="btn btn-sm btn-default" />
                    <asp:Button ID="btnDelete" runat="server" Text="Delete" OnClick="btnDelete_Click"  meta:resourcekey="Delete" CssClass="btn btn-sm btn-default" /><br />
                    <br />
                    <asp:Label ID="lblError" runat="server" CssClass="ifdMessage"></asp:Label>
                </div>
                <div class="well well-sm">
                    <asp:DropDownList ID="lstCurrFrom" runat="server" DataSourceID="SqlDataSource2" DataTextField="code" DataValueField="code">
                    </asp:DropDownList>
                    →
                    <asp:DropDownList ID="lstCurrTo" runat="server" DataSourceID="SqlDataSource2" DataTextField="code" DataValueField="code">
                    </asp:DropDownList>
                    <div class="form-group">
                    <asp:Label ID="Label1" runat="server" Text="Rate:" meta:resourcekey="Rate"></asp:Label>
                    <asp:TextBox ID="txtRate" runat="server" Width="69px" MaxLength="10"></asp:TextBox>
                    </div>
                    <asp:Button ID="btnAdd" runat="server" Text=" Add " OnClick="btnAdd_Click" meta:resourcekey="Add" CssClass="btn btn-sm btn-default" />
                    &nbsp;<asp:Label ID="Label5" runat="server" Text="Note2"  meta:resourcekey="Note2" Font-Italic="True"></asp:Label>
                    <br />
                    <asp:Label ID="Label4" runat="server" Text="Note:" meta:resourcekey="Note" Font-Italic="True"></asp:Label>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                        SelectCommand="bll_currency_get_codes" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                    </asp:SqlDataSource>
                </div>
                <div class="well well-sm">
                     <asp:Label ID="Label3" runat="server" Text="Import X-rate:" meta:resourcekey="ImportXRateFile"></asp:Label>
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                    <asp:Button ID="btnImport" runat="server" Text="Import" meta:resourcekey="Import" onclick="btnImport_Click" CssClass="btn btn-sm btn-default"/>
                    <br />
                    <asp:Label ID="lblError2" runat="server" CssClass="ifdMessage"></asp:Label>
                </div>
            </div>
        </div>
    </div>

    </div>
    </form>
</asp:Content>
